package com.yenlien.traceyun.plant.dao;


import com.yenlien.traceyun.plant.entity.DevThreshold;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author jialong
 * @date 2021/10/17
 * @description:
 **/

public interface DevThresholdDao extends BaseJpaDao<DevThreshold> {



    DevThreshold getByCompIdAndEquIdAndType(String compId, String equId, String type);

    List<DevThreshold> getByCompIdAndEquId(String compId, String equId);

    List<DevThreshold> getByCompId(String compId);



    @Query(value = "SELECT COUNT(*) FROM t_dev_threshold GROUP BY equ_id", nativeQuery = true)
    List<String> getAlarmDevNum();



}
